import re

html_content = """<div>
    <p>This is a paragraph</p>
    <p>Another paragraph</p>
</div>"""

# 匹配div标签及其所有内容（包括换行）
div_pattern = r"<div>(.*?)</div>"
match_div = re.search(div_pattern, html_content, re.DOTALL)
if match_div:
    print("\nMatched HTML content:", match_div.group(1))
